package com.citywithincity.db;

import java.lang.reflect.Field;

import com.citywithincity.db.meta.ColumnStruct;

public class AutoGenerageField {
	
	private ColumnStruct struct;
	private Field field;
	
	public AutoGenerageField(ColumnStruct struct,Field field){
		this.struct = struct;
		this.field = field;
	}
	
	
	public Object get(Object entity){
		try {
			return field.get(entity);
		} catch (IllegalArgumentException e) {
			throw new RuntimeException(e);
		} catch (IllegalAccessException e) {
			throw new RuntimeException(e);
		}
	}
}
